<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">课堂类型:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-label" data-rule="required" class="form-control selectpicker" name="row[label]">
                {foreach name="courseList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.label|htmlentities"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group" hidden>
        <label for="c-merchant" class="control-label col-xs-12 col-sm-2">企业</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-merchant" data-rule="required" class="form-control" name="row[merchant_id]" type="number" value="{$row.merchant_id|htmlentities}" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">文章类型:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-type" data-rule="required" class="form-control" name="row[type]" type="text" value="{$row.type|htmlentities}" readonly>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">描述:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-desc" class="form-control" name="row[desc]" type="text" value="{$row.desc|htmlentities}">
        </div>
    </div>

    {eq name="$row.type" value="video"} 
    <div class="form-group" id="t-video">
        <label class="control-label col-xs-12 col-sm-2">视频文件:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-video"  class="form-control" size="50" name="row[video]" type="text" value="{$row.video|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-video" class="btn btn-danger faupload" data-input-id="c-video" data-mimetype="video/mp4" data-multiple="false" ><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-video" class="btn btn-primary fachoose" data-input-id="c-video" data-mimetype="video/mp4" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-video"></span>
            </div>
        </div>
    </div>
    <div class="form-group" id="t-video-cover">
        <label class="control-label col-xs-12 col-sm-2">视频封面:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-video-cover"  class="form-control" size="50" name="row[video_cover]" type="text" value="{$row.video_cover|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-video-cover" class="btn btn-danger faupload" data-input-id="c-video-cover" data-mimetype="image/*" data-multiple="false" data-preview-id="p-video-cover"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-video-cover" class="btn btn-primary fachoose" data-input-id="c-video-cover" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-video-cover"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-video-cover"></ul>
        </div>
    </div>
    {else /}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">缩略图:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>
    <div class="form-group" id="t-image-cover">
        <label class="control-label col-xs-12 col-sm-2">版面图:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-layout_image"  class="form-control" size="50" name="row[layout_image]" type="text" value="{$row.layout_image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-layout_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-layout_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-layout_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-layout_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-layout_image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
        </div>
    </div>
    {/eq}

    <div class="form-group" hidden>
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
